/**
 * @Author 韦建韩
 * @Date 2022/3/24
 */
package com.example.devops.exception;


import com.example.devops.constant.HttpCodeConstant;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Slf4j
public class CustomException extends RuntimeException{
    Logger logger = LoggerFactory.getLogger(CustomException.class);
    private Integer code;
    public CustomException(Integer code, String message){

        super(message);
        this.code = code;
    }
    public CustomException(String message){

        super(message);
        this.code = HttpCodeConstant.Field.ServerError.code;
    }
    public Integer getCode(){
        return code;
    }
}
